import React from "react";
import { createBrowserRouter } from "react-router-dom";
import Home from "../views/home";
import Login from "../views/login";
import Set from "../views/set";
import List from "../views/list";

export const static_router = [
  {
    path: "/home",
    meta: { title: "首页" },
    element: <Home></Home>,
  },
  {
    path: "/Login",
    meta: { title: "登录", hidden: true },
    element: <Login></Login>,
  },
  {
    path: "/Set",
    meta: { title: "设置", role: ['admin'] },
    element: <Set></Set>,
  },
  {
    path: "/List",
    meta: { title: "列表" },
    element: <List></List>,
  },
];
export const router = createBrowserRouter(static_router);
